package com.hehua.AbstractFacadePattern;

import java.io.FileOutputStream;

/**
 * 文件保存类,充当子系统类
 */
public class FileWriter {
    public void write(String encrypt,String fileNameDes){
        System.out.println("保存密文,写入文件");
        try{
            FileOutputStream outputStream = new FileOutputStream(fileNameDes);
            outputStream.write(encrypt.getBytes());
            outputStream.close();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
